<%@ page import="books4africa.Ranking" %>

<div class="fieldcontain ${hasErrors(bean: rankingInstance, field: 'rank', 'error')} required">
      <label for="rank">
            <g:message code="ranking.rank.label" default="Rank" />
            <span class="required-indicator">*</span>
      </label>
      <g:select name="rank" from="${['0', '1', '2', '3', '4', '5']}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: rankingInstance, field: 'comment', 'error')} required">
      <label for="comment">
            <g:message code="ranking.comment.label" default="Comment" />
      </label>
      <g:textArea name="comment" value="${rankingInstance?.comment}"></g:textArea>
</div>


<div class="fieldcontain ${hasErrors(bean: rankingInstance, field: 'book', 'error')} required">
      <label for="book">
            <g:message code="ranking.book.label" default="Book" />
            <span class="required-indicator">*</span>
      </label>
      <g:hiddenField name="book.id" value="${params.bookId }"/>
            ${bookResult.title }
</div>
<!--  

<div class="fieldcontain ${hasErrors(bean: rankingInstance, field: 'user', 'error')} required">
      <label for="user">
            <g:message code="ranking.user.label" default="User" />
            <span class="required-indicator">*</span>
      </label>
      <g:select id="user" name="user.id" from="${books4africa.User.list()}" optionKey="id" required="" value="${rankingInstance?.user?.id}" class="many-to-one"/>
</div>

-->